{include file="public/head" /}
<title>新闻管理</title>
</head>

<body>
<div id="right_ctn">
    <div class="right_m">
        <div class="hy_list">
            <div class="box_t">
                {eq name="userType" value="0"}
                <span class="name">新闻管理</span>
                {else/}
                <span class="name">我的发布记录</span>
                {/eq}
                <!--当前位置-->
                <div class="position">
                    <a><img src="__STATIC__/admin/images/icon5.png" alt=""/></a>
                    <a href="{:url('admin/Index/index')}" target="_top">首页</a>
                    <span><img src="__STATIC__/admin/images/icon3.png" alt=""/></span>
                    {eq name="userType" value="0"}
                    <a href="">门户管理</a>
                    <span><img src="__STATIC__/admin/images/icon3.png" alt=""/></span>
                    <a href="{:url('admin/NewsController/index')}">新闻管理</a>
                    {else/}
                    <a href="">新闻管理</a>
                    <span><img src="__STATIC__/admin/images/icon3.png" alt=""/></span>
                    <a href="{:url('admin/NewsController/index')}">我的发布记录</a>
                    {/eq}
                </div>
                <!--当前位置-->
            </div>
            <div class="space_hx">&nbsp;</div>
            <div class="xjhy" style="padding:0px;">
                <div class="tabBox_t">
                    <div class="tabBox">
                      <ul class="tabNav">
                        <li class="now"><span><a href="{:url('admin/NewsController/index')}">新闻列表</a></span></li>
                      </ul>
                        <div class="tabCont" style="display:block;">
                            <form action="{:url('admin/NewsController/index')}" method="post">
                                <div class="form-group form-inline">
                                    <div class="form-group">
                                        关键字：
                                        <input class="form-control" type="text" name="keyword" style="width: 120px;" value="{:input('request.keyword')}">
                                    </div>
                                    新闻类别:
                                    <select name="type_id" id="input-type" class="form-control">
                                        <option hidden value=""></option>
                                        {volist name="typeList" id="vo"}
                                        {php}$selected=$type_id==$vo['id']?"selected":"";{/php}
                                        <option value="{$vo.id}" {$selected}>{$vo.name}</option>
                                        {/volist}
                                    </select>
                                    所属部门:
                                    <select name="dep_id" id="input-depId" class="form-control">
                                        <option hidden value=""></option>
                                        {volist name="depList" id="vo"}
                                        {php}$selected=$dep_id==$vo['id']?"selected":"";{/php}
                                        <option value="{$vo.id}" {$selected}>{$vo.name}</option>
                                        {/volist}
                                    </select>
                                    发布时间:
                                    <input type="dateTime" class="form-control jeinput" id="jedate1" value="{:input('request.time_begin')}" style="width: 160px;" name="time_begin"  onfocus=this.blur() /> -
                                    <input type="dateTime" class="form-control jeinput" id="jedate2" value="{:input('request.time_end')}" style="width: 160px;" name="time_end"  onfocus=this.blur() />
                                    <input type="submit" class="btn btn-primary" value="搜索"/>
                                    <a class="btn btn-danger" href="{:url('admin/NewsController/index')}">清空</a>
                                </div>
                            </form>
                         <table class="table table-hover table-bordered">
                            <thead>
                                <tr>
                                    <th>ID</th>
                                    <th>类别</th>
                                    <th>部门</th>
                                    <th>新闻标题</th>
                                    <th>发布者</th>
                                    <th>发布时间</th>
                                    <th>最后修改时间</th>
                                    <th>浏览量</th>
                                    <th>评论量</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                            {volist name="newsList" id="vo"}
                                <tr>
                                    <td>{$vo.id}</td>
                                    <td>{$vo.type}</td>
                                    <td>{$vo.dep}</td>
                                    <td>
                                        <a href="{:url('index/NewsDetailController/index',array('id'=>$vo['id']))}" target="_Blank" title="点击查看新闻详情">
                                            {$vo.title}
                                        </a>
                                    </td>
                                    <td>{$vo.publisher}</td>
                                    <td>{$vo.create_time}</td>
                                    <td>{$vo.update_time}</td>
                                    <td>{$vo.view_num}</td>
                                    <td>{$vo.comment_num}</td>
                                    <td>
                                        {eq name="userType" value="2"}
                                         <a class="label label-primary" href="{:url('admin/NewsController/edit',array('id'=>$vo['id']))}">修改</a>
                                        {/eq}
                                        <a class="label label-danger" onclick="Dialog({$vo['id']},'delete','删除')" href="javascript:void(0);">删除</a>
                                    </td>
                                </tr>
                            {/volist}
                            </tbody>
                        </table>
                        </div>
                        <div class="pagination">{$page}</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
    $("#jedate1").jeDate({
        format: "YYYY-MM-DD hh:mm:ss"
    });
    $("#jedate2").jeDate({
        format: "YYYY-MM-DD hh:mm:ss"
    });
</script>
<script src="__STATIC__/admin/js/dialog-layer.js"></script>
</body>
</html>
